#include "Mystdio.h"

#define myfile "test.txt"

int main()
{
	_FILE *fp = _fopen(myfile, "a");
	if(fp == NULL)
	{
		perror("main::_fopen");
		return 1;
	}

	const char *msg = "hello world\n";

	int cnt = 10;
	while(cnt--)
	{
		_fwrite(fp, msg, strlen(msg));
	}
	
	_fclose(fp);
	fp = NULL;

	return 0;
}
